package com.yt.user.models.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("sys_admin")
@ApiModel(value = "SysAdmin", description = "管理员用户表")
public class SysAdmin implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "管理员唯一ID")
    @TableId(value = "admin_id", type = IdType.AUTO)
    private Integer adminId;

    @ApiModelProperty(value = "登录用户名（管理端账号）")
    @TableField("username")
    private String username;

    @ApiModelProperty(value = "密码（MD5加盐加密）")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "真实姓名")
    @TableField("real_name")
    private String realName;

    @ApiModelProperty(value = "联系电话（管理员联系方式，非登录用）")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "账号状态（0=禁用，1=正常）")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "逻辑删除（0=正常，1=删除）")
    @TableField("is_delete")
    @TableLogic
    private Integer isDelete;
}